<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('index')}">{:lang('商品规格管理')}</a></li>
        <li><a href="{:url('specTypeAdd')}">{:lang('添加商品类型')}</a></li>
    </ul>

    <form class="well form-inline margin-top-20" method="get" action="{:url('index')}">
        商品类型名:
        <input type="text" class="form-control" name="keywords" style="width: 120px;"
               value="{:input('request.keywords','')}" placeholder="请输入{:lang('商品类型名')}">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('index')}">清空</a>
    </form>
    <style>tr th {
        text-align: center
    }</style>
    <table class="table table-hover table-bordered text-center">
        <thead>
        <tr>
            <th>ID</th>
            <th>{:lang('商品类型名')}</th>
            <th>{:lang('ACTIONS')}</th>
        </tr>
        </thead>
        <tbody>
        <foreach name="datas" item="data">
            <tr>
                <td>{$data.id}</td>
                <td>{$data.name}</td>
                <td>
                    <a href="{:url('specTypeEdit',array('id'=>$data['id']))}" class="btn btn-info">编辑</a>
                    <a href="{:url('specAttr',array('type_id'=>$data['id']))}" class="btn btn-warning">规格属性管理</a>
                    <a href="{:url('specTypeDel',array('id'=>$data['id']))}" class="js-ajax-delete btn btn-danger"
                       data-msg="确定删除它吗？">删除</a>
                </td>
            </tr>
        </foreach>
        </tbody>
    </table>
    <div class="pagination"> {$datas->render()}</div>
    <code>
        说明：在添加商品时选择对应商品规格分类即可调用出该分类下的所有属性值
    </code>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>